package homework07;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;

public class Test {
    public static void main(String[] args) {
        //map集合表示班级
        Map<Integer,Student> map=new HashMap<>();
        Map<Integer,Student> map1=new HashMap<>();
//list集合表示年级
        List<Map<Integer,Student>>list=new ArrayList<>();
        Student stu = new Student("阿门",88);
        Student stu1 = new Student("阿东",78);
        Student stu2 = new Student("阿喜",80);
        map.put(1,stu);
        map.put(2,stu1);
        map.put(3,stu2);
        Student stu3 = new Student("阿男",88);
        Student stu4 = new Student("阿西",78);
        Student stu5 = new Student("阿北",80);
        map1.put(3,stu3);
        map1.put(4,stu4);
        map1.put(5,stu5);

        list.add(map);
        list.add(map1);
        for (Map<Integer, Student> data : list) {
            data.forEach(new BiConsumer<Integer, Student>() {
                @Override
                public void accept(Integer integer, Student student) {
                    System.out.println(integer+""+student);
                }
            });
        }

    }
}
